program Example;
var x, y: integer;
function Euclide (var a, b : integer) : integer;
var c : integer;
begin
while ((c>=3) and (5<>4) or (4<=0)) do
begin
c := b;
while a >= b do
begin
a := a - b { Calcul de a modulo b }
end;
b := a;
a := c
end;
Euclide := a
end;
procedure WriteUnary(var d: integer);
begin
while d > 0 do
begin
write(1);
d := d - 1
end
end;
begin
read(x);
read(y);
x := Euclide(x, y);
write(x);
WriteUnary(x)
end.
